package com.fengwei.util;


/**
 * 返回值的枚举值
 */
public enum PltResult {
    //权限系统控制的从CF001开始到CF199
    RESULT_0000("0000", "成功"),
    RESULT_CF001("CF001", "用户已注册成功，是否继续使用机构信息注册机构？"),
    RESULT_CF002("CF002", "该用户下已存在机构"),
    RESULT_CF003("CF003", "用户名或者密码错误"),
    RESULT_CF004("CF004", "用户被停用"),
    RESULT_CF005("CF005", "用户原密码不正确"),
    RESULT_CF006("CF006", "部分角色所属的父节点不存在"),
    RESULT_CF007("CF007", "只有部门才能新增角色或部门"),
    RESULT_CF008("CF008", "该部门下有角色，不能设置为角色"),
    RESULT_CF009("CF009", "该部门下有角色，不能删除"),
    RESULT_CF010("CF010", "模块层级最多3级，目录层级最多2级"),
    RESULT_CF011("CF011", "存在子模块，无法删除"),
    RESULT_CF012("CF012", "用户不存在"),
    RESULT_CF013("CF013", "此用户名已存在，用户名不可重复"),
    RESULT_CF014("CF014", "orgid不可为空"),
    RESULT_CF015("CF015", "该账号没有权限登陆此系统"),
    RESULT_CF016("CF016", "未输入完整的用户名"),
    RESULT_CF017("CF017", "无权限操作相关的记录"),//给用户更新的时候用的
    RESULT_CF018("CF018", "角色不存在"),
    RESULT_CF019("CF019", "用户未维护手机号"),
    RESULT_CF020("CF020", "单用户一天最多重置5次密码，今日已超过最大重置次数"),
    RESULT_CF021("CF021", "您未绑定过第三方授权账户"),
    RESULT_CF022("CF022", "该支付宝已被绑定，无法二次绑定账号"),
    RESULT_CF023("CF023", "解绑成功"),
    RESULT_CF024("CF024", "该账户不需要解除绑定"),
    RESULT_CF025("CF025", "绑定成功，请登录"),
    RESULT_CF026("CF026", "samllogintoken不能为空"),
    RESULT_CF027("CF027", "samllogintoken错误，请确认"),
    RESULT_CF028("CF028", "该账号已被绑定，无法二次绑定"),
    RESULT_CF029("CF029", "根据用户ID找不到用户"),
    RESULT_CF030("CF030", "未设置多因子认证属性，请设置"),
    RESULT_CF031("CF031", "未找到该用户对应谷歌密钥"),
    RESULT_CF032("CF032", "一次性密码验证失败"),

    //真正业务错误代码从CF300到CF399
    RESULT_CF300("CF300", "数据库不存在"),
    RESULT_CF301("CF301", "获取表出错"),
    RESULT_CF302("CF302", "该库下无表"),
    RESULT_CF303("CF303", "session中没有库"),
    RESULT_CF304("CF304", "SQL执行出错"),
    RESULT_CF305("CF305", "无权限执行任何SQL"),
    RESULT_CF306("CF306", "只能执行select语句"),
    RESULT_CF307("CF307", "目前只支持select,insert,update,delete"),
    RESULT_CF308("CF308", "添加数据库时必须输入数据库密码"),
    RESULT_CF309("CF309", "数据库连接测试异常"),
    RESULT_CF310("CF310", "常用SQL不存在"),
    RESULT_CF311("CF311", "申请不存在"),
    RESULT_CF312("CF312", "申请已被通过或拒绝，无法修改、删除或者审核"),
    RESULT_CF313("CF313", "非DBA用户无法审核"),
    RESULT_CF314("CF314", "数据变更请求中只能执行insert,update,delete语句"),
    RESULT_CF315("CF315", "webssh服务器打开失败"),
    RESULT_CF316("CF316", "未找到ssh服务器对应的用户"),
    RESULT_CF317("CF317", "未找到ssh服务器"),
    RESULT_CF318("CF318", "用户无该ssh服务器访问权限"),
    RESULT_CF319("CF319", "无sshserver的授权记录"),
    RESULT_CF320("CF320", "根据ID未找到对应的服务器用户记录"),

    //认证级的错误代码从CF800到CF999
    RESULT_CF970("CF970", "加密机指令返回错误"),
    RESULT_CF987("CF987", "SpringSecurity校验不通过，无权调用本接口"),
    RESULT_CF988("CF988", "session已过期"),
    RESULT_CF989("CF989", "不要操作过于频繁"),
    RESULT_CF990("CF990", "MSGTOKEN非法，和session不匹配"),
    RESULT_CF991("CF991", "无相关权限"),
    RESULT_CF992("CF992", "此账号在异地登录，您已被踢出"),
    RESULT_CF993("CF993", "MSGTOKEN非法，安全随机数不存在"),
    RESULT_CF994("CF994", "不支持该机构配置的验签方式"),
    RESULT_CF995("CF995", "未配置接入机构公私钥对"),
    RESULT_CF996("CF996", "接入机构不存在"),
    RESULT_CF997("CF997", "签名错误"),
    RESULT_CF998("CF998", "内部服务不可用"),
    RESULT_CF999("CF999", "系统错误"),
    ;

    private String pCode;
    private String pName;
    public static String PLT_RESULT = "result";
    public static String PLT_RESULTDESC = "resultdesc";

    private PltResult(String pCode, String pName) {
        this.pCode = pCode;
        this.pName = pName;
    }

    public String getpCode() {
        return pCode;
    }

    public void setpCode(String pCode) {
        this.pCode = pCode;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }
}
